package com.lx.bookstore.service;

import com.lx.bookstore.dao.BookMapper;
import com.lx.bookstore.entity.Book;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class BookServiceImpl implements BookService{

    @Autowired
    BookMapper bookMapper;
    @Override
    public List<Book> bookList() {
        return bookMapper.bookList();
    }

    @Override
    public boolean addBook(Book book) {
        return bookMapper.addBook(book);
    }

    @Override
    public boolean delBook(Integer[] id) {
        return bookMapper.delBook(id);
    }

    @Override
    public Book all(Integer id) {
        return bookMapper.all(id);
    }

    @Override
    public boolean update(Book book) {
        return bookMapper.update(book);
    }
}
